package com.eleven.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.eleven.pojo.Msg;
import com.eleven.pojo.ProjectsType;
import com.eleven.service.ProjectstypeService;

@Controller
public class ProjectstypeController {
	@Autowired
	ProjectstypeService projectstypeService;
	/**
	 * 返回所有公益类型信息
	 * @return
	 */
	@RequestMapping("/gylx")
	@ResponseBody
	public Msg getProjectstype() {
		//查出所有公益类型信息
		List<ProjectsType> list = projectstypeService.getProjectstype();
		return Msg.success().add("projectstype", list);
	}
}
